package TopSky.IOT.JUnit.XStream.demo;
import java.util.List;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
import com.thoughtworks.xstream.annotations.XStreamInclude;

/**
 *@ClassName:PersonBean
 *@author: chenyoulong  Email: chen.youlong@payeco.com
 *@date :2012-9-28 下午3:10:47
 *@Description:TODO 
 */
@XStreamAlias("person")
public class PersonBean {
    @XStreamAlias("firstName")
    private String firstName;
    @XStreamAlias("lastName")
    private String lastName;
    
    @XStreamAlias(value="phones")
    @XStreamImplicit(itemFieldName="")
    List<PhoneNumber> phone;
    public List<PhoneNumber> getPhone() {
		return phone;
	}

	public void setPhone(List<PhoneNumber> phone) {
		this.phone = phone;
	}

	@XStreamAlias(value="telphone")
  //  @XStreamInclude(PhoneNumber.class)
    private telphone tel;
    @XStreamAlias("faxphone")
    private PhoneNumber fax;
    
    //测试一个标签下有多个同名标签
    @XStreamAlias("friends")
    private Friends friend;
    
    //测试一个标签下循环对象
    @XStreamAlias("pets")
    private Pets pet;

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public telphone getTel() {
		return tel;
	}

	public void setTel(telphone tel) {
		this.tel = tel;
	}

	public PhoneNumber getFax() {
		return fax;
	}

	public void setFax(PhoneNumber fax) {
		this.fax = fax;
	}

	public Friends getFriend() {
		return friend;
	}

	public void setFriend(Friends friend) {
		this.friend = friend;
	}

	public Pets getPet() {
		return pet;
	}

	public void setPet(Pets pet) {
		this.pet = pet;
	}



    
    
    //省略setter和getter
    
}